
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>NOTE TO DO LIST</title>
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/style.css">
		<script type="text/javascript" src="__PUBLIC__/jquery-1.7.2.min.js"></script>
		<script type="text/javascript">
			$(function() {
				$('input.update').on('click', function(e) {
					var content = $(this).attr("data-content");
					var id = $(this).attr("data-id");
					$('#modify_textarea').val(content);
					$('#modify_textid').val(id);
				});
			});
		</script>
	</head>
	<body>
		<h1 align="center">NOTE TO DO LIST</h1>
		<form method="post" action="__URL__/addItem">
			<div align="center">
				<textarea name="noteItem" rows="3" cols="50" class="input"></textarea>
		        <input type="submit" id="confirm" value="发表" class="sure"/>
	        </div>
	    </form>
		<hr width="500px">
		<div id="cover" align="center">
			<form method="post" action="__URL__/updateItem">
				<textarea id="modify_textarea" name="noteItems" rows="3" cols="50" class="input"></textarea>
				<input id="modify_textid" type="hidden" name="noteIds" value="">
		        <input type="submit" value="确定" class="sure"/>
			</form>
		</div>
		<hr width="500px">	
		<volist name="note" id="data">
			<div class="wrap" align="center">
				<div class="_content" style="width:500px" align="left">
					{$i}.{$data.noteItem}<br/>
				</div>
				<div style="width:500px">
					<div class="item">{$data.createDate}</div>
					<div style="float:right">
						<span class="_id" id="{$data.noteId}">{$data.noteId}</span>
						<input type="button" data-id="{$data.noteId}" data-content="{$data.noteItem}" class="update btn" value="更新"/>
						<a href="__URL__/deleteItem/noteId/{$data.noteId}">删除</a>
						<!-- <input type="submit" id="update" value="更新" class="btn"/> -->
		        		<!-- <input type="submit" id="delete" value="删除" class="btn"/> -->
		        	</div>
		        	<br/>
		        </div>
	        </div>
	        <br/>
		</volist>
	</body>
</html>
